package br.uniriotec.pssgbd.trab.model.bo;

import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JOptionPane;

import br.uniriotec.pssgbd.trab.model.entidade.Prato;

public class PratoBO {
	
	private static PratoBO instancia;
	private static List<Prato> listaPratos = null;
	protected PadraoBO dao = new PadraoBO();
	Connection connection;
	
	public PratoBO(){
		try{
			
			connection = dao.criaConexao(false);
			
		}
		catch (Exception e){
			JOptionPane.showMessageDialog(null, ""+e.getMessage());
		}
	}
	
	public static PratoBO getInstance() {
		if(instancia == null){
			instancia = new PratoBO();
			listaPratos = new ArrayList<Prato>();
		}
		return instancia;
	}

}
